# Object tap.getDeviceInfo()
# 功能描述
获取设备基础信息
# 返回值
# Object
属性 | 类型 | 说明 |
abi | string | 应用( TapTap APP)二进制接口类型(仅 Android 支持) |
deviceAbi | string | 设备二进制接口类型(仅 Android 支持) |
benchmarkLevel | number | 设备性能等级,iOS返回固定值-1,Android返回固定值32 |
brand | string | 设备品牌 |
model | string | 设备型号。新机型刚推出一段时间会显示unknown, TapTap 会尽快进行适配。 |
system | string | 操作系统及版本 |
platform | string | 客户端平台 |
cpuType | string | 设备 CPU 型号(仅 Android 支持)(Tips: GPU 型号可通过 WebGLRenderingContext.getExtension('WEBGL_debug_renderer_info') 来获取) |
memorySize | string | 设备内存大小,单位为 MB |
# 示例代码
const deviceInfo = tap.getDeviceInfo()
console.log(deviceInfo.abi)
console.log(deviceInfo.benchmarkLevel)
console.log(deviceInfo.brand)
console.log(deviceInfo.model)
console.log(deviceInfo.platform)
console.log(deviceInfo.system)